 
<header id="header" class="mui-bar mui-bar-black mui-bar-nav">
    <a class="mui-icon mui-icon-left-nav mui-pull-left"  href="{:url('site/site_list')}"></a>
    <h1 class="mui-title">{$result.building_name}</h1>
</header>
 {include file="site/site_nav" /}
<div class="mui-content mui-content-my addProject" style="margin-top: 1em">
    <div class="mui-input-row">
        <label>编号</label>
        <input style="width: 30%;float: none;" placeholder="编号" type="text" value="{$result.building_contract_number}" readonly>
          <?php if($result['building_status'] == 1) {?>
        <a class="project-btn processing" href="#">进行中</a>
        <?php }elseif($result['building_status'] == 2){ ?>
        <a class="project-btn" href="#">已完结</a>
         <?php }elseif($result['building_status'] == 3){ ?>
         <a class="project-btn processing" href="#">再次进行中</a>
        <?php } ?> 
    </div>
    <div class="mui-input-row">
        <label>工地名称</label>
        <input type="text" placeholder="" value="{$result.building_name}" readonly>
    </div>
    <div class="mui-input-row">
        <label>客户名称</label>
        <input type="text" placeholder=""  value="{$result.building_customer_name}"  readonly>
    </div>
    <div class="mui-input-row">
        <label>工程名称</label>
        <input type="text" placeholder="" value="{$result.building_project_name}"  readonly>
    </div>
    <div class="mui-input-row" id="showCityPicker">
        <label>工地地址</label>
        <input type="text" id="cityResult" placeholder="" value="{$result.building_project_address}" readonly>
    </div>
    <div class="mui-input-row"  data-options='{"type":"date"}' id='startTime'>
        <label>开始时间</label>
        <input id='result' type="text" readonly placeholder="请选择开始时间" value="<?php echo date('Y-m-d',$result['building_begin_time']);?>">
    </div>
    <div class="mui-input-row">
        <label>工地金额</label>
        <input type="text" placeholder="请输入金额" value="{$result.building_amount} W"   readonly>
    </div>
    <div class="mui-input-row">
        <label>负责人</label>
        <input type="text" placeholder="请输入金额" value="{$result.building_add_user_name}"  readonly>
    </div>



    <div class="mui-input-row input-row-small">
        <div>
            <label>已付金额</label>
            <input type="text" name="row[building_amount_paid]" id="paid" value="{$result.building_amount_paid}" placeholder="" readonly><span>万</span>
        </div>
        <div>
            <label>已付比例</label>
            <input type="text" name="row[building_amount_paid_rate]" id="paid_rate"  value="{$result.building_amount_paid_rate}" p readonly="" placeholder=""><span>%</span>
        </div>
    </div>

 
    <div class="mui-input-row"> 
    </div>
    
</div>
<div class="mui-content mui-content-my addProject" style="margin-top: 2em">
    <div class="mui-input-row">
        <label>工地风采</label>
    </div>
    <div class="selected-user-img">
        <div style="width: 6em;height: 6em"><img src="<?php if($result['building_info']){ echo "/".$result['building_info']; }else{ echo "__CDN__/style/images/project.png";}?>" alt=""></div> 
    </div>
</div>
<div class="mui-content-padded">
  <?php if($result['building_status'] == 2) {?> 
    <button style="background: linear-gradient(-90deg, #3383FD, #78C2FF);border: none" type="button" class="mui-btn mui-btn-primary mui-btn-block">重新开启</button>
    <?php }else{?>
    <div class="mui-content-padded btn-bottom-fixed"><a href="#">
    <button style="background: linear-gradient(-90deg, #3383FD, #78C2FF);border: none" type="button" class="mui-btn mui-btn-primary mui-btn-block">提交结算书</button></a>
</div>
    <?php } ?> 
</div>
<script src="__CDN__/style/js/jquery-1.11.3.js"></script>
<script>
        var startX=0,startY=0,moveEndX=0,moveEndY=0,X=0,Y=0,nowX=0;
        var a=$("#navBar");
        var navWidth=parseInt(a.css('width'));
        //var ulWidth=parseInt(a.children().css('width'));
        var ulWidth=parseInt(a.children().children().css('width'))*5+20;
        a.children().css('width',ulWidth);

        a.on("touchstart", function(e) {
            // e.preventDefault();
            startX = e.originalEvent.changedTouches[0].pageX;
            startY = e.originalEvent.changedTouches[0].pageY;
            nowX=parseInt(a.children().css('left'));
        });
        a.on("touchmove", function(e) {
            // e.preventDefault();
            moveEndX = e.originalEvent.changedTouches[0].pageX;
            moveEndY = e.originalEvent.changedTouches[0].pageY;
            X = moveEndX - startX;
            Y = moveEndY - startY;
            if ( Math.abs(X) > Math.abs(Y) && X > 0 ) {
                // alert("left 2 right");
                //console.log(X,Y);
                if((X+nowX)<0){
                    a.children().css('left',(X+nowX)+'px');
                }
            }
            else if ( Math.abs(X) > Math.abs(Y) && X < 0 ) {
                //alert("right 2 left");
                //console.log(navWidth,ulWidth,navWidth-ulWidth);
                //console.log(liWidth);
                if((X+nowX)>(navWidth-ulWidth)){
                    a.children().css('left',(X+nowX)+'px');
                }
            }
            else if ( Math.abs(Y) > Math.abs(X) && Y > 0) {
                //alert("top 2 bottom");
            }
            else if ( Math.abs(Y) > Math.abs(X) && Y < 0 ) {
                //alert("bottom 2 top");
            }
            else{
                //alert("just touch");
            }
        });
</script>
 